Chapter 2 - Printing Extensions
This chapter describes how you can develop printing extensions to modify or add to the printing features provided by QuickDraw GX. You need to read this chapter if you are developing printing extensions, including those that support a hardware device or modify the appearance of the pages that are printed by applications.To use this chapter, you need to be familiar with how the printing features in QuickDraw GX work. Inside Macintosh: QuickDraw GX Printing describes these features and gives you an overview of the printing process. The chapter "Introduction to Printing Extensions and Drivers" in this book provides an overview of how QuickDraw GX provides printing and how you can override portions of its functionality in a printing extension or printer driver.
Printing extensions comprise a collection of resources. Before reading this chapter, you need some understanding of Macintosh resources and resource files. You can read about the Macintosh Resource Manager in Inside Macintosh: More Macintosh Toolbox.
Printing extensions make use of collections, which are managed by the Collection Manager, and are activated by messages, which are managed by the Message Manager. You need to know about the Collection Manager and Message Manager components of QuickDraw GX to understand how extensions work. Both of these managers are described in Inside Macintosh: QuickDraw GX Environment and Utilities.
This chapter begins with an overview of printing extensions and then describes
This chapter gives you the conceptual information that you need in the form of a guided tour through an extension that draws a background picture on each page of a document. For specific reference information about the messages that you override to write a printing extension, see the chapter "Printing Messages" in this book. For specific reference information about the resources that you need to include in your printing extension file, see the chapter "Printing Resources" in this book.
- the kinds of tasks that you can use a printing extension to perform
- the development of a printing extension
- the resources that compose a printing extension
- some of the messages that you can override to develop a printing extension
- the interactions between printing extensions and QuickDraw GX
- Note
- The code samples presented in this chapter are taken from a recent version of the sample code. These samples are not complete and may have been slightly modified since printing. You can find the latest version of the code in the QuickDraw GX sample code.
![]()
Chapter Contents
- About Printing Extensions
- Printing Extension Tasks
- Adding Panels to Print Dialog Boxes
- Modifying a Page During Spooling
- Modifying a Page During Imaging
- Modifying the Device Communications Process
- Developing a Printing Extension
- The Jump Table
- The Printing Message Overrides
- Choosing the Messages to Override
- Forwarding Messages
- Sending Messages
- Handling Exceptions in Your Message Overrides
- Implementing the Background Picture Extension Functions
- Initializing the Extension Environment
- Adding a Background Picture Panel to the Print Dialog Box
- Handling an Event in the Background Picture Panel
- Storing the Background Picture in the Spool File
- Adding the Background Picture to a Page
- Closing the Spool File
- Shutting Down the Background Picture Extension Environment
- Using Resources in Printing Extensions
- Defining Code Segments in Your Printing Extension
- Defining Version Compatibility for Your Printing Extension
- Defining the Scope of Your Printing Extension
- Optimizing the Use of Your Extension
- Specifying Which Messages Your Extension Overrides
- Defining the Loading Order of Your Extension
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help